package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Set;

import javax.xml.bind.annotation.XmlTransient;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractBaseEntity;

/** @author Hibernate CodeGenerator */
public class OrderStatus extends AbstractBaseEntity implements Serializable {

    /** persistent field */
    private Set orders;

    /** full constructor */
    public OrderStatus(String description, Set orders) {
        this.description = description;
        this.orders = orders;
    }

    /** default constructor */
    public OrderStatus() {
    }

    /** minimal constructor */
    public OrderStatus(Set orders) {
        this.orders = orders;
    }

    @XmlTransient
    public Set getOrders() {
        return this.orders;
    }

    public void setOrders(Set orders) {
        this.orders = orders;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof OrderStatus) ) return false;
        OrderStatus castOther = (OrderStatus) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
